﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Dal;

namespace Bll
{
    public class CategoryAd
    {
        public static DataTable MULTIPLE(string strCon)
        {
            return Dal.CategoryAd.MULTIPLE(strCon);
        }

        public static DataTable MULTIPLE(string strCon, int type)
        {
            return Dal.CategoryAd.MULTIPLE(strCon, type);
        }

        public static DataTable MULTIPLE(string strCon, int catId, int num)
        {
            return Dal.CategoryAd.MULTIPLE(strCon, catId, num);
        }

        public static DataTable MULTIPLE(string strCon, int size, int index, int adType,out int countRow, out int countPage)
        {
            return Dal.CategoryAd.MULTIPLE(strCon, size, index, adType, out countRow, out countPage);
        }

        public static DataTable Single(string strCon, int pkid)
        {
            return Dal.CategoryAd.Single(strCon, pkid);
        }

        public static DataTable Single(string strCon, int type, int catId)
        {
            return Dal.CategoryAd.Single(strCon, type, catId);
        }

        public static int Update(string strCon,
                int txbCatID,
                int txbAdType,
                string txbAdTitle,
                string txbKeywords,
                string txbDescription,
                string txbImgURL,
                string  txbAdContent,
                string txbStartDate,
                string txbEndDate,
                int txbPKID
            )
        {
            return Dal.CategoryAd.Update(
                    strCon,
                    txbCatID,
                    txbAdType,
                    txbAdTitle,
                    txbKeywords,
                    txbDescription,
                    txbImgURL,
                    txbAdContent,
                    txbStartDate,
                    txbEndDate,
                    txbPKID
            );
        }

        public static int Update(string strCon,
                int txbCatID,
                int txbAdType,
                string txbAdTitle,
                string txbKeywords,
                string txbDescription,
                string txbLinkURL,
                string txbImgURL,
                string txbAdContent,
                string txbStartDate,
                string txbEndDate,
                int txbPKID
            )
        {
            return Dal.CategoryAd.Update(
                    strCon,
                    txbCatID,
                    txbAdType,
                    txbAdTitle,
                    txbKeywords,
                    txbDescription,
                    txbLinkURL,
                    txbImgURL,
                    txbAdContent,
                    txbStartDate,
                    txbEndDate,
                    txbPKID
            );
        }

        public static int Insert(string strCon,int txbCatID,int txbAdType,string txbAdTitle,string txbKeywords,string txbDescription,
                                    string txbImgURL,string txbAdContent,string txbStartDate,string txbEndDate)
        {
            return Dal.CategoryAd.Insert(strCon,txbCatID,txbAdType,txbAdTitle,txbKeywords,txbDescription,txbImgURL,txbAdContent,txbStartDate,txbEndDate);
        }

        public static int Insert(string strCon,int txbCatID,int txbAdType,string txbAdTitle,string txbKeywords,string txbDescription,
                                    string txbLinkURL,string txbImgURL,string txbAdContent,string txbStartDate,string txbEndDate)
        {
            return Dal.CategoryAd.Insert(strCon,txbCatID,txbAdType,txbAdTitle,txbKeywords,txbDescription,txbLinkURL,txbImgURL,
                                            txbAdContent,txbStartDate,txbEndDate);
        }


        public static int DELETE(string strCon, int pkid)
        {
            return Dal.CategoryAd.DELETE(strCon,pkid);
        }
    }
}
